package com.taiji.workOrder.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.taiji.workOrder.mapper.UserProjectMapper;
import com.taiji.workOrder.domain.UserProject;
import com.taiji.workOrder.service.IUserProjectService;

/**
 * 用户-项目关联Service业务层处理
 * 
 * @author taiji
 * @date 2023-02-26
 */
@Service
public class UserProjectServiceImpl implements IUserProjectService 
{
    @Autowired
    private UserProjectMapper userProjectMapper;

    /**
     * 查询用户-项目关联
     * 
     * @param userId 用户-项目关联主键
     * @return 用户-项目关联
     */
    @Override
    public List<UserProject> selectUserProjectByUserId(Long userId)
    {
        return userProjectMapper.selectUserProjectByUserId(userId);
    }

    /**
     * 查询用户-项目关联列表
     * 
     * @param userProject 用户-项目关联
     * @return 用户-项目关联
     */
    @Override
    public List<UserProject> selectUserProjectList(UserProject userProject)
    {
        return userProjectMapper.selectUserProjectList(userProject);
    }

    /**
     * 新增用户-项目关联
     * 
     * @param userProject 用户-项目关联
     * @return 结果
     */
    @Override
    public int insertUserProject(UserProject userProject)
    {
        return userProjectMapper.insertUserProject(userProject);
    }

    /**
     * 修改用户-项目关联
     * 
     * @param userProject 用户-项目关联
     * @return 结果
     */
    @Override
    public int updateUserProject(UserProject userProject)
    {
        return userProjectMapper.updateUserProject(userProject);
    }

    /**
     * 批量删除用户-项目关联
     * 
     * @param userIds 需要删除的用户-项目关联主键
     * @return 结果
     */
    @Override
    public int deleteUserProjectByUserIds(Long[] userIds)
    {
        return userProjectMapper.deleteUserProjectByUserIds(userIds);
    }

    /**
     * 删除用户-项目关联信息
     * 
     * @param userId 用户-项目关联主键
     * @return 结果
     */
    @Override
    public int deleteUserProjectByUserId(Long userId)
    {
        return userProjectMapper.deleteUserProjectByUserId(userId);
    }
}
